package com.bajiao.service.recharge;

import com.bajiao.entity.recharge.RechargeMenu;
import com.bajiao.entity.user.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bajiao.entity.pay.PayNotifyData;
import com.bajiao.entity.pay.ali.AliPayResult;
import com.bajiao.entity.pay.wx.WxPayResult;
import com.bajiao.entity.recharge.Recharge;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 充值
 * @Author: FanJq
 * @Date:   2024-10-19
 * @Version: V1.0
 */
public interface RechargeService extends IService<Recharge> {

    /**
     * @Description
     * 获取充值菜单
     * @date 2024/12/25 10:35
     * @author FanJq
     * @param
     * @return {@link List< RechargeMenu>}
    */
    List<RechargeMenu> getMenuList();

    /**
     * @Description
     * 订单失效事件
     * @date 2024/12/25 11:36
     * @author FanJq
     * @param recharge
     * @return
    */
    void expiredEvent(Recharge recharge);

    /**
     * @Description
     * 微信支付
     * @date 2024/12/25 10:55
     * @author FanJq
     * @param request
     * @param user
     * @param menuId
     * @param source
     * @return {@link WxPayResult}
    */
    WxPayResult wxPay(HttpServletRequest request, User user, String menuId, String source);

    /**
     * @Description
     * 支付成功逻辑
     * @date 2024/12/25 11:43
     * @author FanJq
     * @param payNotifyData
     * @return
    */
    void completePayment(PayNotifyData payNotifyData);
}
